Skip to content

python-math #36: feat(math): mode collapse — degenerate guards become the only path (item 2 parked) - #2665

Closed
jucor wants to merge 1 commit into
spr/edge/31c19ea5from
spr/edge/13e86ed3
Closed

jucor wants to merge 1 commit into
spr/edge/31c19ea5from
spr/edge/13e86ed3

Conversation

@jucor

@jucor jucor commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

What

GOAL_CUTOVER_READY.md Phase 2, chunk C1 of the mode collapse — removing the engine's improved-mode branches so the Clojure-faithful behavior becomes the only code path (branch-site inventory in journal session 7). The engine now always runs the Clojure semantics on degenerate input:

  • _compute_pca: only a truly-EMPTY matrix short-circuits (Clojure runs real math on a 1x1 matrix — the every-vote step-0 oracle); the improved-mode <2 guard is deleted.
  • _compute_clusters: the <2-in-conv-participants early return and the <2-base-clusters early return (both improved-mode-only) are deleted — degenerate ticks fall through to the full base->group clustering chain exactly like conversation.clj (max-k always >= 2).
  • conv_repness: the <2 matrix guard is deleted — repness/consensus is computed at every size (the best-agree guarantee).

Parking

The deleted improved-mode guards are queue item 2 in POST_CUTOVER_IMPROVEMENTS.md; the improvements/* park commit — which preserves the deleted code as the reverse of this commit's guard hunks — is minted at the end of the collapse. Improved-mode guard tests are deleted with their branches (test_degenerate_tick_parity.py). Legacy tests unchanged and green.

commit-id:13e86ed3


Stack:


⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

This was referenced Jul 27, 2026
This was referenced Jul 27, 2026
@jucor
jucor force-pushed the spr/edge/13e86ed3 branch from ab4b995 to 76ad530 Compare July 28, 2026 00:11
@jucor
jucor force-pushed the spr/edge/31c19ea5 branch from bc79e36 to 7193da4 Compare July 28, 2026 00:11
@jucor jucor changed the title feat(math): mode collapse — degenerate guards become the only path (item 2 parked) python-math #36: feat(math): mode collapse — degenerate guards become the only path (item 2 parked) Jul 28, 2026
… the only path (item 2 parked)

## What

`GOAL_CUTOVER_READY.md` Phase 2, chunk C1 of the mode collapse — removing the engine's improved-mode branches so the Clojure-faithful behavior becomes the only code path (branch-site inventory in journal session 7). The engine now always runs the Clojure semantics on degenerate input:

- `_compute_pca`: only a truly-EMPTY matrix short-circuits (Clojure runs real math on a 1x1 matrix — the every-vote step-0 oracle); the improved-mode <2 guard is deleted.
- `_compute_clusters`: the <2-in-conv-participants early return and the <2-base-clusters early return (both improved-mode-only) are deleted — degenerate ticks fall through to the full base->group clustering chain exactly like `conversation.clj` (max-k always >= 2).
- `conv_repness`: the <2 matrix guard is deleted — repness/consensus is computed at every size (the best-agree guarantee).

## Parking

The deleted improved-mode guards are queue item 2 in `POST_CUTOVER_IMPROVEMENTS.md`; the `improvements/*` park commit — which preserves the deleted code as the reverse of this commit's guard hunks — is minted at the end of the collapse. Improved-mode guard tests are deleted with their branches (`test_degenerate_tick_parity.py`). Legacy tests unchanged and green.

commit-id:13e86ed3
@jucor
jucor force-pushed the spr/edge/13e86ed3 branch from 76ad530 to f05518b Compare July 28, 2026 01:10
@jucor

jucor commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

Closing: this change is already on edge. Its commit f05518b55 is byte-identical (same git patch-id) to 876faf280 on edge, which landed with the production deploy #2685 (merged 2026-09-08).

This PR was one layer of a jj spr stack. The stack's commits reached edge through #2685, so this PR was never merged or closed automatically. Closing it loses nothing.

@jucor jucor closed this Oct 15, 2026
@jucor
jucor deleted the spr/edge/13e86ed3 branch October 15, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant